package com.bfly.mall.order.enums;

/**
 * 退款进度状态
 *
 * @author 长沙商脉科技有限公司
 * @date 2020/4/17 21:06
 */
public enum RefundProgressEnum {

    UN_PROGRESS(1000, "未处理"),
    PROGRESSING(1001,"退款中"),
    SUCCESS(1002, "退款成功"),

    FAIL(1003, "退款失败"),

    CLOSE(1004,"退款关闭");

    private int id;
    private String name;

    RefundProgressEnum(int id, String name) {
        this.id = id;
        this.name = name;
    }

    public static RefundProgressEnum getStatus(int id) {
        for (RefundProgressEnum status : RefundProgressEnum.values()) {
            if (id == status.getId()) {
                return status;
            }
        }
        return null;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
